load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")

go_library(
    name = "staticcheck_lib",
    srcs = ["staticcheck.go"],
    importmap = "github.com/cockroachdb/cockroach/vendor/honnef.co/go/tools/cmd/staticcheck",
    importpath = "honnef.co/go/tools/cmd/staticcheck",
    visibility = ["//visibility:private"],
    deps = [
        "//vendor/golang.org/x/tools/go/analysis",
        "//vendor/honnef.co/go/tools/lint",
        "//vendor/honnef.co/go/tools/lint/lintutil",
        "//vendor/honnef.co/go/tools/simple",
        "//vendor/honnef.co/go/tools/staticcheck",
        "//vendor/honnef.co/go/tools/stylecheck",
        "//vendor/honnef.co/go/tools/unused",
    ],
)

go_binary(
    name = "staticcheck",
    embed = [":staticcheck_lib"],
    visibility = ["//visibility:public"],
)
